\beginsection 18.5

(a) Let $f$ and $g$ be continuous functions on $[a,b]$ such that
$f(a)\ge g(a)$ and $f(b)\le g(b)$. Prove that $f(x_0)=g(x_0)$ for at least
one $x_0$ in $[a,b]$.
\medskip
Define a function $h=f-g.$
The function $h$ is continuous because $f$ and $g$ are continuous
(theorem 17.4, p. 92).
We have $h(a)\ge0$ and $h(b)\le0$.
Now we can apply IVT and assert that some $x_0$ exists at which $h(x_0)=0$
(simply replace $y$ with 0 in the theorem).
Since $h(x_0)=f(x_0)-g(x_0)=0$, we have proved that $f(x_0)=g(x_0)$.

\medskip
(b) Show that Example 1 can be viewed as a special case of part (a).
\medskip
Example 1 includes a ``little trick'' if defining $g(x)=f(x)-x$.
(There's the hint for the solution of 18.5 (a) above.)
The $x$ can be considered a function so we have the difference of two
functions as in part (a). The example is a special case because we have the
specific function $x$.

